package edu.zut.cs.software.perfect.base.service;

import java.io.Serializable;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import edu.zut.cs.software.perfect.base.domain.BaseEntity;

/**
 * @ClassName GenericManager
 * @Description TODO
 * @Author xiaoyingzi
 * @Date 2020年3月17日 下午5:26:23
 * @Version 1.0
 */
public interface GenericManager<PK extends Serializable, T extends BaseEntity<PK>> {

	/**
	 * 
	 * @param courseId
	 * @return
	 */
	
	public void delete(PK courseId);

	public void deleteAll();
	
	public Iterable<T> findAll();
	
	public Page<T> findAll(Pageable page);
	
	public T findById(PK courseId);
	
	public Iterable<T> save(Iterable<T> entities);
	
	public T save(T entity);

	public long count();
}
